import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    name: 'Not Found',
    path: '*',
    component: () => import('../views/404')
  },
  {
    name: 'Homepage',
    path: '/',
    component: () => import('../views/Homepage')
  },
  {
    name: 'Login',
    path: '/login',
    component: () => import('../views/Login')
  },
  {
    name: 'Welcome',
    path: '/welcome',
    component: () => import('../views/Welcome'),
    meta: {
      requireAuth: true
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
